//
//  CommonGoodsSourceCell.m
//  NtoccShipper
//
//  Created by mac on 2019/12/26.
//  Copyright © 2019 zhuchongjin. All rights reserved.
//

#import "CommonGoodsSourceCell.h"
@interface CommonGoodsSourceCell()
@property (strong, nonatomic) CJLabel *labOrderNum;

@property (strong, nonatomic) CJLabel *labShipperAdress;
@property (strong, nonatomic) CJLabel *labConsigneeAdress;
@property (nonatomic,strong) CJLabel *labCoalTypeName;
//@property (strong, nonatomic) UIView *viewDetail; // 系=详情
//@property (nonatomic,strong) UIView *viewAgain; // 再来一单
//@property (strong, nonatomic) UIView *viewStop; //
//@property (nonatomic,strong) UIView *viewRefresh; // 刷新
//@property (nonatomic,strong) UIView *viewPrice; // 竞价
//
//@property (strong, nonatomic) UIView *viewDelecte; //
////@property (nonatomic,strong) UIView *viewSendOrder;
////@property (nonatomic,strong) UIView *viewPush;
//@property (strong, nonatomic) UIView *viewChange; //
//@property (nonatomic,strong) UIView *viewAdjustPrice; //调价




@property (nonatomic,strong) CJView *viewBottomLine;
@property (nonatomic,strong) CJView *viewTopLine;
@end
@implementation CommonGoodsSourceCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setCellInfoWithSourceModel:(SourceListModel *)model{
    
    self.labOrderNum.text = model.mainOrderNumber;

    // zhuanghuo  卸货
    self.labShipperAdress.text = CJStringWithFormat(@"%@%@",model.shipperAddress,model.shipperDetailAddress);
    self.labConsigneeAdress.text = CJStringWithFormat(@"%@%@",model.consigneeAddress,model.consigneeDetailAddress);
    
    self.labCoalTypeName.text = CJStringWithFormat(@"%@ %@%@ %@%@ %@",[CJRegular getIsStrEmpty:model.coalTypeName] ? @"":model.coalTypeName,@(model.coalPrice).cj_money_description ,[CJRegular getIsStrEmpty:model.isTrunkName] ? @"":model.isTrunkName, @(model.weight).cj_description ,[CJRegular getIsStrEmpty:model.coalUnitName] ? @"":model.coalUnitName ,[CJRegular getIsStrEmpty:model.pushVehicleUse] ? @"":model.pushVehicleUse);
    
}


- (void)drawRect:(CGRect)rect{
    
    [CJControl drawLineOfDashByCAShapeLayer:self.viewBottomLine lineLength:2 lineSpacing:1.5 lineColor:[UIColor cjBackgroundColor] lineDirection:NO];
    [CJControl drawLineOfDashByCAShapeLayer:self.viewTopLine lineLength:2 lineSpacing:1.5 lineColor:[UIColor cjBackgroundColor] lineDirection:NO];
}


@end
